package com.object.demo1;
/**
 * 
 * @author Administrator
 *
 */
public class PersonTest {
	public static void main(String[] args) {
		Person p1 = new Person();
		p1.name = "xiaokong";
		p1.age = 18;
		System.out.println(p1.name);
	
		p1.eat();
		p1.sleep();
		p1.speek("Chinese");
		
		Person p2 =new Person();
		
		System.out.println(p2.age);
		System.out.println(p2.name);
	}
	
}

class Person{
	String name;
	int age;
	boolean isMan;
	
	//方法
	public void eat(){
		System.out.println("人可以吃饭");
	}
	public void sleep(){
		System.out.println("人可以睡觉");
	}
	public void speek(String language){
		System.out.println("人可以说话，说的是"+language);
	}
}

